<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button id="btn">按钮</button>
<script>
btn.onclick = function (e){
    console.log("click...");
    console.log(e.isTrusted);
}

setInterval(function (){
    btn.click();  // 模拟用户的点击
}, 100)
</script>
</body>

</html>